package jeecg.business.entity.keyinfo;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;
import javax.persistence.SequenceGenerator;

import jodd.util.StringUtil;

/**   
 * @Title: Entity
 * @Description: 舆情长信息
 * @author LinYingPiaoJian
 * @date 2015-09-06 15:23:18
 * @version V1.0   
 *
 */
@Entity
@Table(name = "NMS_KEY_INFO_TEXT", schema = "")
@SuppressWarnings("serial")
public class KeyinfoTextEntity implements java.io.Serializable {
	/**主键*/
	private java.lang.String id;
	/**内容*/
	private java.lang.String content;
	
	private String refword;
	
	
	

	@Transient
	public String getScontent() {
		String scontent = null;
		
		if(StringUtil.isNotBlank(content)){
			int length = content.length();
			if(length>=300)
				scontent = content.substring((length-300)/2,300+(length-300)/2);
			else
				scontent = content;
		}
		return scontent;
	}
	
	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  主键
	 */
	
	@Id
	@Column(name ="ID",nullable=false,length=32)
	public java.lang.String getId(){
		return this.id;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  主键
	 */
	public void setId(java.lang.String id){
		this.id = id;
	}
	/**
	 *方法: 取得java.lang.Object
	 *@return: java.lang.Object  内容
	 */
	@Column(name ="CONTENT")
	public java.lang.String getContent(){
		return this.content;
	}

	/**
	 *方法: 设置java.lang.Object
	 *@param: java.lang.Object  内容
	 */
	public void setContent(java.lang.String content){
		this.content = content;
	}
}
